#pragma once

struct SUBRESOURCE_DATA
{
	const void* pSysMem;
	UINT SysMemPitch;
	UINT SysMemSlicePitch;
};

struct MAPPED_SUBRESOURCE
{
	void* pData;
	UINT RowPitch;
	UINT DepthPitch;
};


#define USAGE_DEFAULT   0 
#define USAGE_IMMUTABLE 1
#define USAGE_DYNAMIC   2
#define USAGE_STAGING   3

enum
{
	PRIMITIVE_TOPOLOGY_POINTLIST = 1,
	PRIMITIVE_TOPOLOGY_LINELIST = 2,
	PRIMITIVE_TOPOLOGY_LINESTRIP = 3,
	PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4,
	PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5,
};

enum 
{
	BIND_VERTEX_BUFFER = 0x1L,
	BIND_INDEX_BUFFER = 0x2L,
	BIND_CONSTANT_BUFFER = 0x4L,
	BIND_SHADER_RESOURCE = 0x8L,
	BIND_STREAM_OUTPUT = 0x10L,
	BIND_RENDER_TARGET = 0x20L,
	BIND_DEPTH_STENCIL = 0x40L,
	BIND_UNORDERED_ACCESS = 0x80L
};

enum
{
	RESOURCE_MISC_UNKNOW = 0,
	RESOURCE_MISC_GENERATE_MIPS = 0x1L,
	RESOURCE_MISC_SHARED = 0x2L,
	RESOURCE_MISC_TEXTURECUBE = 0x4L,
	RESOURCE_MISC_DRAWINDIRECT_ARGS = 0x10L,
	RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS = 0x20L,
	RESOURCE_MISC_BUFFER_STRUCTURED = 0x40L,
	RESOURCE_MISC_RESOURCE_CLAMP = 0x80L,
	RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x100L,
	RESOURCE_MISC_GDI_COMPATIBLE = 0x200L,
};

enum
{
	CPU_ACCESS_WRITE = 0x10000L,
	CPU_ACCESS_READ = 0x20000L
};


enum 
{
	UAV_DIMENSION_UNKNOWN = 0,
	UAV_DIMENSION_BUFFER = 1,
	UAV_DIMENSION_TEXTURE1D = 2,
	UAV_DIMENSION_TEXTURE1DARRAY = 3,
	UAV_DIMENSION_TEXTURE2D = 4,
	UAV_DIMENSION_TEXTURE2DARRAY = 5,
	UAV_DIMENSION_TEXTURE3D = 8
};

#ifdef D3D11
#include "DX11Device.h"
#endif

